package com.nuaner.nfc.card;

import android.content.Context;
import android.nfc.Tag;
import android.nfc.tech.IsoDep;
import android.nfc.tech.MifareClassic;
import android.nfc.tech.NfcF;
import android.nfc.tech.NfcV;

public class CardManager {
	public static String load(Context context, Tag tag) {
		
		String techs = new String();
		
	/*	final IsoDep isodep = IsoDep.get(tag);
		if (isodep != null) {
			return IsoDepCard.load(isodep);
		}

		final NfcV nfcv = NfcV.get(tag);
		if (nfcv != null) {
			return NfcVCard.load(nfcv);
		}
		*/
		String[] techList = tag.getTechList();
		techs += "tech";
		for(String tech: techList) {
			techs += tech + "\n";
		}	
		final MifareClassic mfc = MifareClassic.get(tag);
		if (mfc != null) {
			return new MifareClassicCard().load(context, mfc).toString();
		}
		return techs;
	}
}
